package com.fz.mapper;

import com.fz.entity.Information;
import com.fz.entity.Messageadd;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Z-C-Y on 2018-03-07.
 * message.jsp=====资讯
 */
@Service
public interface WebMessageMapper {
    /*页面字段拿出来*/
    @Select("select * from Messageadd")
    public List<Messageadd> quryMessageadd();

    /*分页======查询数据库的数据的总数据*/
    @Select("select * from information ")
    public List<Information> queryInformation();

    //有了pageSize和startIndex，就可以拿到每页的数据
    @Select("select * from information limit #{startIndex},#{pageSize}")
    public List<Information> queryInformationData(@Param("startIndex") int startIndex,@Param("pageSize") int pageSize);


}
